<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="../common/commonJS.jsp" %>
<%@ include file="../common/commonLabel.jsp" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>订单财务明细</title>
</head>
<script type="text/javascript">

function doIns(cid){
	document.all["clid"].value = cid;
	document.forms[0].action = "<%=path %>/endgather.action"
	document.all["operate"].value = "inspage";
	document.forms[0].submit();
}

</script>
<body>
<form action="<%=path %>/clientfinance.action" method="post" >
<table width="80%" border="0" cellpadding="0" cellspacing="0" >
  <tr>
     <td>
     <table width="100%" height="100%" border="0" cellspacing="0" cellpadding="0" class="MainBody">
		<tr>
    		<td width="760" class="MainBody_title"><hello:forValue type="title" /></td>
    		<td></td>
		</tr>
      <tr>
        <td valign="top" colspan="2">
        <table border="0" cellspacing="0" cellpadding="0" style="margin-top: 10px;margin-bottom: 10px;width:95%">
			<tr height="35">
				<td align="right" ><input name="clid" type="hidden" value=""/>
				<input name="operate" type="hidden" value=""/></td>
				<td align="right" ><input type="button" value="查 询" class="btn" onclick="doSel()"/>&nbsp;&nbsp;&nbsp;&nbsp;
				<!--<input type="button" value="打 印" class="btn" onclick="doIns()"/>--></td>
			</tr>
			<tr >
				<td colspan="2" class="box01">
				<SPAN>客户名称：<input type="text" name="clientname" value="${clientname}" maxlength="100"></SPAN>
				<SPAN>单位名称：<input type="text" name="unitname" value="${unitname}" maxlength="100"></SPAN>
				<SPAN>日期范围：<input type="text" name="begin" value="${begin}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:false})" class="Wdate" maxlength="30">
				&nbsp;&nbsp;至&nbsp;&nbsp;<input type="text" name="end" value="${end}" onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',readOnly:false})" class="Wdate" maxlength="30"></SPAN>
				<SPAN>结算状态：<select name="settle" style="width: 65">
					<option value="">请选择</option>
					<option value="done" <c:if test="${settle == 'done'}">selected</c:if> >已结算</option>
					<option value="undone" <c:if test="${settle == 'undone'}">selected</c:if> >未结算</option></select></SPAN>
				</td>
			</tr>
		</table>
        <table border="0" cellpadding="0" cellspacing="0" class="MainBody_table">
           <tr>
				<th width="20%" nowrap="nowrap">客户名称</th>
				<th width="15%" nowrap="nowrap">单位名称</th>
				<th width="9%" nowrap="nowrap">联系电话</th>
				<th width="8%" nowrap="nowrap">订单数量</th>
				<th width="8%" nowrap="nowrap">订单总金额</th>
				<th width="8%" nowrap="nowrap">已付金额</th>
				<th width="8%" nowrap="nowrap">发票金额</th>
				<th width="8%" nowrap="nowrap">未付金额</th>
				<th width="8%">操作</th>
			</tr>
			<c:forEach items="${listinfo}" varStatus="status" var="rows">
			<tr>
				<td nowrap="nowrap">${rows.clientname}</td>
				<td nowrap="nowrap">${rows.unitname}</td>
				<td nowrap="nowrap">${rows.phone}</td>
				<td nowrap="nowrap">${rows.ordernum}</td>
				<td nowrap="nowrap">${rows.ordermoney}</td>
				<td nowrap="nowrap"><font color="green">${rows.realmoney}</font></td>
				<td nowrap="nowrap"><font color="olive">${rows.billmoney}</font></td>
				<td nowrap="nowrap"><font color="red" style="font-weight: bold">${rows.debtCash}</font></td>
				<td nowrap="nowrap">
				<span class='RoleSpan' onclick="doIns('${rows.clientid}')" title='添加结算信息' style='color: blue' onmouseout="doMsOut('blue')" onmouseover='doMsOver()'>添加结算</span>
				</td> 
			</tr>
			</c:forEach>
		<c:if test="${empty listinfo}">
			<tr>
				<td colspan="11" align="center">暂时没有您可以浏览的数据</td>
			</tr>
		</c:if>
          </table>
          <c:if test="${!empty listinfo}">
          <table border="0" cellpadding="0" cellspacing="0" class="MainBody_fun">
            <tr>
              <td>
               <hello:AllPage />
			  </td>
            </tr>
          </table>
          </c:if>
          </td>
      </tr>
    </table></td>
  </tr>
</table>
</form>
</body>
</html>